/**
 * 定义天报表模块
 */
(function(window, angular, undefined){
	var module = angular.module('water.apps.ws.reportData.dayDataManager', ['water.apps.common.report.reportFormBase',
	                                                                          'water.common.dateUtil']);
	
	module.controller('reportDataDayManagerController',function($scope,$monitorDataService,$controller,$dateUtil){

		var control = $controller("commonReportFormController",{$scope:$scope});
		/**
		 * 统计的属性
		 */
		$scope.statisticsField = ['maxData','minData','avgData'];
		$scope.dataAPIName = 'getDayReport';
		$scope.dataExportAPIName = "exportDayExcel";
		/**
		 * 获取查询参数
		 */
		$scope.getQueryObject = function(){
			
			var parmsStr = $scope.selectedModel.parmToChecksStr;
			var queryObject = {
					"MN":$scope.selectedModel.MN,
					"PARMS":parmsStr,
					"START":$scope.startDate + " 00:00:00",
					"END":$scope.endDate + " 23:59:59"
				};
			return queryObject;
		}
		function _init(){
			$scope.startDate = $dateUtil.formatDate(new Date(),'yyyy-MM-dd');
			$scope.endDate=$dateUtil.formatDate(new Date(),'yyyy-MM-dd');
		}
		
		_init();
	});
}(window, angular));